package com.freecloud.javabasics.design.strategy;

import com.freecloud.common.LoggerUtil;

/**
 * @Author: maomao
 * @Date: 2019-11-15 10:13
 */
public class StrategyTest {


    public static void main(String[] args) {
        Eat eat = new Chopsticks();
        Eat eat2 = new Fork();

        eat.eat();
        eat2.eat();

        LoggerUtil.split();


        //调用枚举策略
        EnumStrategy.eat(EnumStrategy.EatType.CHOPSTICK);
        LoggerUtil.split();

        //调用注册策略
        StrategyContext.eat("knife");
    }
}
